package com.everwin.web.config;


import com.everwin.web.mapper.FileDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 初始化文件详细表
 */
@Component
public class InitTable {

    @Autowired
    public void initFileTable(FileDetailMapper fileDetailMapper){
        String fileTableName = "file_detail";
        int count = fileDetailMapper.exists(fileTableName);
        if(count < 1) {
            fileDetailMapper.createTable(fileTableName);
        }
    }

}
